package com.globallogic.dailyplanner.config;

import javax.ejb.embeddable.EJBContainer;
import javax.naming.NamingException;

import org.apache.openejb.AppContext;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.springframework.beans.factory.annotation.Autowired;


public class BaseAcceptanceConfig {
	private static JettyServer server = new JettyServer();
	private static EJBContainer container;
//	private static Context ctx;
	
	@Autowired
	private AppContext con;
	@BeforeClass
	public static void setUpClass() throws NamingException{
		server.start();
		container = EJBContainer.createEJBContainer();

//		ctx = container.getContext();
		
//		simpleEJB = (SimpleEJB) ctx.lookup(SimpleEJB.class.getName());
	}

	@AfterClass
	public static void tearDownClass(){
		server.stop();
		if (container != null){
			container.close();
		}
	}
}
